package com.sanxiau.dormitory.yang.mapper;

import com.sanxiau.dormitory.yang.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface LeaveMapper {
    /*添加请假记录*/
    public int addLeave(Leave leave);
    /*通过学号查询请假记录*/
    public List<Leave> queryLeavesByStu_id(String stu_id);
    /*查询所有请假记录*/
    public List<Leave> queryAllLeaves();
    /*通过ID查询请假记录*/
    public Leave queryLeaveByID(int id);
    /*请假条批准*/
    public int updateLeave(Date approval_date,String approver,int id);
    /*请假条销假*/
    public int updateOverLeave(Date remove_date,int id);
}
